package com.imooc.bilibili.service.impl;

import com.imooc.bilibili.dao.UserRoleRelationDao;
import com.imooc.bilibili.entity.UserRoleRelation;
import com.imooc.bilibili.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userRoleService")
public class UserRoleServiceImpl implements UserRoleService {

    @Autowired
    private UserRoleRelationDao userRoleDao;

    @Override
    public List<UserRoleRelation> getUserRoleByUserId(Long userId) {
        return userRoleDao.getUserRoleByUserId(userId);
    }

    @Override
    public void insertUserRoleRelationServicee(UserRoleRelation relation) {
        userRoleDao.insert(relation);
    }
}
